using System;
using System.ComponentModel;

namespace Microsoft.WowAddonStudio.Lua.RuntimeService.WowBench
{
	/// <summary>
	/// 
	/// </summary>
	public interface IOutputControl : ISynchronizeInvoke, IDisposable
	{
		/// <summary>
		/// Appends text to the current text of a control.
		/// </summary>
		/// <param name="text">The text to append to the current contents of the text box.</param>
		int AppendText(string text);

		/// <summary>
		/// Appends error text to the current text of a control.
		/// </summary>
		/// <param name="text">The text to append to the current contents of the text box.</param>
		int AppendErrorText(string text);

		/// <summary>
		/// Appends information text to the current text of a control.
		/// </summary>
		/// <param name="text">The text to append to the current contents of the text box.</param>
		int AppendInfoText(string text);

		/// <summary>
		/// Gets or sets the current text in the text box control.
		/// </summary>
		string Text{get;}

		/// <summary>
		/// Scrolls the contents of the control to the current caret position.
		/// </summary>
		void ScrollToCaret();

		///<summary>
		///Executes the delegate on the main thread that this object executes on.
		///</summary>
		///<returns>
		///An <see cref="T:System.IAsyncResult"></see> interface that represents the asynchronous operation started by calling this method.
		///</returns>
		///<param name="method">A <see cref="T:System.Delegate"></see> to a method that takes parameters of the same number and type that are contained in args. </param>
		object BeginInvoke(Delegate method);

		///<summary>
		///Executes the delegate on the main thread that this object executes on.
		///</summary>
		///<returns>
		///An <see cref="T:System.Object"></see> that represents the return value from the delegate being invoked, or null if the delegate has no return value.
		///</returns>
		///<param name="method">A <see cref="T:System.Delegate"></see> that contains a method to call, in the context of the thread for the control. </param>
		object Invoke(Delegate method);

		/// <summary>
		/// Gets or sets the starting point of text selected in the control.
		/// </summary>
		int Position { get; set; }

	}
}